/* USER CODE BEGIN Header */
/**
  ******************************************************************************
  * @file           : main.h
  * @brief          : Header for main.c file.
  *                   This file contains the common defines of the application.
  ******************************************************************************
  * @attention
  *
  * Copyright (c) 2023 STMicroelectronics.
  * All rights reserved.
  *
  * This software is licensed under terms that can be found in the LICENSE file
  * in the root directory of this software component.
  * If no LICENSE file comes with this software, it is provided AS-IS.
  *
  ******************************************************************************
  */
/* USER CODE END Header */

/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __MAIN_H
#define __MAIN_H

#include "basic_types.h"

#ifdef __cplusplus
extern "C" {
#endif

#define DATA_RECV_MAXSIZE 128
typedef struct data_recv_st
{
     uint8 buff[DATA_RECV_MAXSIZE];//uint8_t* buff;
     uint16 len;
     uint8  flag;
}data_recv_t;



#include "stm32h5xx_hal.h"

void Error_Handler(void);
extern S_SYSTEM_DATA gSystemData;

//#define PRESSFROMPOS 1
//#define REPEATTEST 1

void systemData_init();
S_SYSTEM_DATA* getSystemData();
void start485send();
void start485recv();
void wait_pos_ok(void);
#ifdef __cplusplus
}
#endif

#endif /* __MAIN_H */
